module.exports = function(config){
  config.set({

    basePath : './',

    files: [          
      {pattern: 'bower_components/react/react-with-addons.js', include: true },
      {pattern: 'bower_components/react/react-dom.js', include: true },
      {pattern: 'bower_components/underscore/underscore.js', include: true },
      {pattern: 'bower_components/classnames/index.js', include: true },
      {pattern: 'bower_components/jquery/dist/jquery.js', include: false },
      {pattern: 'bower_components/jasmine-ajax/lib/mock-ajax.js', include: false },
      {pattern: 'bower_components/jasmine-jquery/lib/jasmine-jquery.js', include: false},
      {pattern: 'web/js/**/*.js', included: false }, 
      {pattern: 'test/unit/**/*.js', included: false }, 
      'test/test-main.js'
    ],
    exclude: ['web/js/webreader.js', 'web/js/component/.module-cache/**/*.js', 'test/unit/.module-cache/**/*.js'],

    autoWatch : true,

    frameworks: ['jasmine', 'seajs'],

    browsers : ['Chrome'],

    plugins : [
            'karma-chrome-launcher',          
            'karma-jasmine',
            'karma-seajs',
            'karma-junit-reporter',          
            'karma-coverage'
            ],

    preprocessors: {
      'web/js/component/*.js': 'coverage'
    },

    reporters: ['progress', 'junit', 'coverage'],

    coverageReporter: {
      type: 'html',
      dir: 'coverage/'     
    },

    junitReporter : {
      outputFile: 'test_out/unit.xml',
      suite: ''
    },

    colors: true
  });
};